
const viewWidthFn=(width=0)=>{
    var viewWidth ,
    //做永久存储
    html = document.documentElement;//获得html

    if(html.style.fontSize){
        return viewWidth= html.style.fontSize;
    }
    
    if (!viewWidth) {
    if (html) {
        var windowWidth = !width?html.clientHeight /19.20:width/19.20;
        viewWidth = windowWidth + 'px';
        // localStorage.setItem("viewWidth", viewWidth);
    }
    // window.document.html.style.fontSize = viewWidth;
    return viewWidth
    }
    
}

export default viewWidthFn

